package io.kiki.sba.registry.store.jdbc.mapper;

import io.kiki.sba.registry.store.jdbc.domain.ProvideDataDomain;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface ProvideDataMapper {

    /**
     * insert or update provideData
     */
    public int save(ProvideDataDomain data);

    /**
     * insert or update provideData
     */
    public int update(@Param("data") ProvideDataDomain data, @Param("exceptVersion") long exceptVersion);

    /**
     * query provideData
     */
    public ProvideDataDomain query(@Param("dataCenter") String dataCenter, @Param("dataKey") String dataKey);

    /**
     * remove provideData
     */
    public int remove(@Param("dataCenter") String dataCenter, @Param("dataKey") String dataKey, @Param("dataVersion") long dataVersion);

    /**
     * query by page
     */
    List<ProvideDataDomain> queryByPage(@Param("dataCenter") String dataCenter, @Param("start") int start, @Param("limit") int limit);

    /**
     * query total count
     */
    int selectTotalCount(@Param("dataCenter") String dataCenter);
}
